package de.baumann.browser.present

import de.baumann.browser.api.OdinObserver
import de.baumann.browser.api.net.vo.Order
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.IRechargeOrderView
import de.baumann.browser.model.OrderModel

class RechargeOrderPresenter : BasePresenter<IRechargeOrderView>() {
    fun rechargeRecord() {
        OrderModel().rechargeRecord()
                .subscribe(object : OdinObserver<List<Order>>(view) {
                    override fun onSuccess(data: List<Order>?) {
                        if (view != null) {
                            view.setRechargeRecord(data)
                        }
                    }
                })
    }
}